package org.goodprinciples.oracolo.model;

import java.io.Serializable;
import java.util.Objects;

/**
 *
 * @author Francesco Conte
 */
public class SupportedLanguage extends OracoloBean<SupportedLanguage> {
    
    private SupportedLanguageId id = null;
    
    public SupportedLanguage() {}

    public SupportedLanguageId getId() {
        return id;
    }

    public void setId(SupportedLanguageId id) {
        this.id = id;
    }

    public boolean equals(java.lang.Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SupportedLanguage other = (SupportedLanguage) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        int hash = 7;
        hash = 37 * hash + Objects.hashCode(this.id);
        return hash;
    }

    public String toString() {
        return "SupportedLanguage{" + "id=" + id + '}';
    }
    
    public static class SupportedLanguageId implements Serializable {
        
        private Application application = null;
        private Language language = null;
        
        public SupportedLanguageId() {}
        
        public Application getApplication() {
            return application;
        }

        public void setApplication(Application application) {
            this.application = application;
        }

        public Language getLanguage() {
            return language;
        }

        public void setLanguage(Language language) {
            this.language = language;
        }

        public boolean equals(java.lang.Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final SupportedLanguageId other = (SupportedLanguageId) obj;
            if (!Objects.equals(this.application, other.application)) {
                return false;
            }
            if (!Objects.equals(this.language, other.language)) {
                return false;
            }
            return true;
        }

        public int hashCode() {
            int hash = 5;
            hash = 71 * hash + Objects.hashCode(this.application);
            hash = 71 * hash + Objects.hashCode(this.language);
            return hash;
        }

        public String toString() {
            return "SupportedLanguageId{" + "application=" + application + ", language=" + language + '}';
        }
        
    }
    
}
